# from tqdm import tqdm
# lt=['a','b','c','a','b','c','a','b','c','a','b','c','a','b','c']
# for i,item in enumerate(tqdm(lt)):
#     print(i,item)



# import torch
# x = torch.randn((4,4))
# u, s, v = x.svd()
# print(u, s, v)
# print(s.shape)



# import torch
# import numpy as np
# row_idx, col_idx = np.triu_indices(50)
# print(row_idx)
# print(col_idx)
# x = torch.randn((1,50,50))
# print(x)
# out = x[:, row_idx, col_idx]
# print(out)
# print(out.shape)

# 36 21
# 25 15



# import torch
# # 创建一个二维张量
# x = torch.tensor([[1, 3, 2], [4, 5, 6], [7, 8, 9]])
#
# # 在第一个维度（行）上查找最大值
# max_value_row, max_index_row = torch.max(x, 0)
# print("Max values per row:", max_value_row)
# print("Max indices per row:", max_index_row)
#
# # 在第二个维度（列）上查找最大值
# max_value_col, max_index_col = torch.max(x, 1)
# print("Max values per column:", max_value_col)
# print("Max indices per column:", max_index_col)
#
# # 创建一个二维张量
# x = torch.tensor([[1, 3, 2], [4, 5, 6], [7, 8, 9]])
#
# # 在第一个维度（行）上查找最大值，并保留形状
# max_value_row, max_index_row = torch.max(x, 0, keepdim=True)
# print("Max values per row (keeping shape):", max_value_row)
# print("Max indices per row (keeping shape):", max_index_row)
#
# # 在第二个维度（列）上查找最大值，并保留形状
# max_value_col, max_index_col = torch.max(x, 1, keepdim=True)
# print("Max values per column (keeping shape):", max_value_col)
# print("Max indices per column (keeping shape):", max_index_col)



# a = [1,2,3]
# b = [4,5,6]
# c = [7,8,9]
# zipped = zip(a,b,c)
# # print(zipped)
# for a,b,c in zipped:
#     print(a,b,c)



# x = [1,2,3,4,5,6]
# for i in x[:len(x)-1]:
#     print(i)
# print(x[5])


# import os
# import torch
#
# from examples.demo import Net
# print('===> Try resume from checkpoint')
# if os.path.isdir('./examples/checkpoint'):
#     try:
#         checkpoint = torch.load('./examples/checkpoint/res2net_v2_ckpt.t7')
#         # model = Net()
#         model = checkpoint['net']       # 从字典中依次读取
#         start_epoch = checkpoint['epoch']
#         acc = checkpoint['acc']
#         print('===> Load last checkpoint data')
#         print(start_epoch)
#         print(acc)
#     except FileNotFoundError:
#         print('Can\'t found autoencoder.t7')
# else:
#     start_epoch = 0
#     print('===> Start from scratch')



x = [0,1,2,3,4,5]
for i in x:
    print(i)
    break
